.TH E1432_SET_ZOOM 3 E1432
.SH NAME
.nf
e1432_set_zoom - Set zoom state
e1432_get_zoom - Get zoom state
.fi
.IX e1432_set_zoom(3) 3
.IX e1432_get_zoom(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_zoom(E1432ID hw, SHORTSIZ16 ID, SHORTSIZ16 state)
SHORTSIZ16 e1432_get_zoom(E1432ID hw, SHORTSIZ16 ID, SHORTSIZ16 *state)
.cE
.SH DESCRIPTION

\fIe1432_set_zoom\fR sets the zoom state, of a module.  If zoom is on, 
the inputs are digitally mixed (i.e. multiplied by) by a complex 
sine wave whose frequency is set by \fIe1432_set_center_freq\fR.  
This results in each time
sample becoming a real/imaginary pair, doubling the amount
of time data.  When a FFT is preformed on this complex time data, the 
resulting spectrum is centered around the chosen center frequency.
By choosing a small span with the \fIe1432_set_span\fR function, it is
then possible to "zoom in" or increase FFT resolution around a narrow band:
center frequency +/- span/2.

There are span, sampling frequency, and center frequency limitations in the
zoom mode due to the extra processing required.  These limitations are 
module dependent.

In the E1432 the max center frequency is limited to one fifth of the normal top 
span of the module for sampling frequencies of 51.2KHz and lower; i.e. 

	max center frequency = sampling clock frequency / (2.56 * 5)

For sampling frequencies above 51.2KHz the front ends of the E1432 modules
divide down the clock to the ADC by a factor of two; so the max center 
frequency is also limited by an extra factor of two to prevent aliasing:

	max center frequency = sampling clock frequency / (2.56 * 10)

For the default sampling frequency of 51.2Khz, the max center frequency
frequency in zoom is limited to 4KHz with any energy above this frequency
attenuated by the decimation filters.  
There are only four spans available in the zoomed mode instead of the
eight available in the normal mode.  The top span available io one half the max
center frequency.  
Spans are centered on the center frequency and
progress lower by a factor of four rather than the normal factor of two.  
For the default sampling frequency of 51.2Khz the available zoomed spans 
are 2KHz, 500Hz, 125Hz, and 31.25Hz.

For the E1433A the max sampling frequency as set by \fIe1432_set_clock_freq\fR
is limited to 65536 Hz.
This limitation does not apply to the E1433B - zoom is available for all
legal sampling frequencies.

The max center frequency is:

	max center frequency = sampling clock frequency / 2.0

For the E1433A, the max span is limited to sampling clock frequency / 5.12
or 12.8KHz in the case of the maximum sample frequency of 65536 Hz.
There are 15 lower spans available, each a factor of 2 lower than the
previous higher one.   

For the E1433B, the max span is the same as the non-zoom case,
sampling clock frequency / 2.56, which is one factor of 2 filter and
decimate operation.
16 additional factor of 2 spans below this are available.

When a FFT is being done on the zoomed data, the measurement blocksize is
restricted to a minimum of 32 and a maximum of 4096, and must be a power of two.

If the center frequency is lower than .5 * span, negative frequency points are
included in the time data and the FFT.
These frequency points only duplicate information available in the positive
frequency range of a FFT.
However, they can be considered to corrupt the time data, since some
signals contain only positive frequency components while others contain both.
The onset of this time domain problem actually starts when the center
frequency is lower than .5 * span + .14 * span, or .64 * span, due to the
transition region of the digital filters.

In a similar manner, the center frequency plus .5 * span can be set such that 
frequencies above the ADC antialias cutoff (.45 * sampling clock frequency)
are included.
These frequencies are attenuated by the antialias filters
and are also not alias protected.

\fIe1432_get_zoom\fR returns the current value of the state, of a
single channel or group of channels \fIID\fR, into a memory location
pointed to by \fIstate\fR.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained with a
call to \fIe1432_create_channel_group\fR, or the ID of a single channel.

\fIstate\fR can be either E1432_ZOOM_ON or E1432_ZOOM_OFF

.SH "RESET VALUE"
After a reset state is set to E1432_ZOOM_OFF.
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_set_center_freq, e1432_set_span, e1432_set_clock_freq
.ad
